@import '../variables/default.scss';
@import '../mixins/index.scss';

$component: '.at-checkbox';

.at-checkbox {
  position: relative;
  background-color: $color-bg;
  display: flex;
  flex-direction: column;
  @include hairline-top-relative();
  @include hairline-bottom-relative();
  &-RN {
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: $color-border-light;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: $color-border-light;
  }

  /* elements */
  &__option-wrap {
    display: flex;
    flex-direction: column;
    padding: $spacing-v-lg $spacing-h-xl $spacing-v-lg 0;
    @include hairline-top();
    &-0 {
      border-top-width: 0;
    }

    &-RN {
      border-top-width: 1px;
      border-top-style: solid;
      border-top-color: $color-border-light;
      &-0 {
        border-top-width: 0;
      }
    }
  }

  &__option-cnt {
    display: flex;
    flex-direction: row;
  }

  &__title {
    display: flex;
    color: $at-checkbox-title-color;
    font-size: $at-checkbox-title-font-size;
    line-height: $line-height-zh * $at-checkbox-title-font-size;
    text-align: left;
  }

  &__icon-cnt {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: 4px;
    margin-right: $spacing-h-lg;
    width: $at-checkbox-circle-size;
    min-width: $at-checkbox-circle-size;
    height: $at-checkbox-circle-size;
  }

  &__desc {
    display: flex;
    padding-left: $at-checkbox-circle-size + $spacing-h-lg;
    color: $at-checkbox-desc-color;
    font-size: $at-checkbox-desc-font-size;
    text-align: left;
    line-height: $line-height-zh * $at-checkbox-desc-font-size;
    letter-spacing: 0;
  }

  &__option {
    padding-left: $spacing-h-xl;
    @include active;

    &--disabled {
      #{$component}__option-cnt,
      #{$component}__desc {
        opacity: $opacity-disabled;
      }

      &:active {
        background-color: $color-bg;
      }
    }
  }
}
